package TEST;


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import shared.Player.Player;

import client.Game.Sender;

import Server.Server;

public class SenderTest {
	private Server server;
	private Sender sender;
	private Socket socket;
	private PrintWriter netOut;;
	
	@Before
	public void setUp() throws Exception {
		server = new Server();
		socket = new Socket("localhost", Server.DEFAULT_SERVER_PORT);
		
		netOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
				socket.getOutputStream())), true);
		sender = new Sender(netOut,new Player("Ants",23));
	}

	@After
	public void tearDown() throws Exception {
		server.stop();
	}
	
//	@Test
//	public void sendAnswerTest(){
//		sender.sendAnwser("Vastus");
//	}				
}
